import request from '@/utils/request'

export default {
  //搜索签约分页查询
  getList(currentPage, pageSize, querySignVo) {
    return request({
      url: `/sign/search/sign/${currentPage}/${pageSize}`,
      method: 'post',
      data: querySignVo
    })
  },
  //搜索签约记录分页查询
  getRecordList(currentPage, pageSize, querySignRecordVo) {
    return request({
      url: `/sign/search/record/${currentPage}/${pageSize}`,
      method: 'post',
      data: querySignRecordVo
    })
  },
  // 根据ID查询
  queryById(id){
    return request({
      url: `/sign/${id}`,
      method: 'get',
    })
  },
  // 根据ID查询签约记录
  queryRecordById(id){
    return request({
      url: `/sign/record/${id}`,
      method: 'get',
    })
  },
  // 根据ID删除
  remove(id) {
    return request({
      url: `/sign/${id}`,
      method: 'delete'
    })
  },
  // 增加
  add(brand) {
    return request({
      url: `/sign`,
      method: 'post',
      data: brand
    })
  },
  //编辑
  edit(signVo) {
    return request({
      url: `/sign`,
      method: 'put',
      data: signVo
    })
  },
  //编辑签约记录
  editRecord(signRecordVo) {
    return request({
      url: `/sign/record`,
      method: 'put',
      data: signRecordVo
    })
  },
  //查询所有的用户
  queryAll() {
    return request({
      url: `/sign`,
      method: 'get'
    })
  },
  //审核通过
  passAudit(signRecordEditVo) {
    return request({
      url: `/sign/audit`,
      method: 'put',
      data: signRecordEditVo
    })
  },

}
